\(\int x^2 \log (c (a+b \sqrt {x})^p) \, dx\) [47]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 123 \[ \int x^2 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=\frac {a^5 p \sqrt {x}}{3 b^5}-\frac {a^4 p x}{6 b^4}+\frac {a^3 p x^{3/2}}{9 b^3}-\frac {a^2 p x^2}{12 b^2}+\frac {a p x^{5/2}}{15 b}-\frac {p x^3}{18}-\frac {a^6 p \log \left (a+b \sqrt {x}\right )}{3 b^6}+\frac {1}{3} x^3 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \]

[Out]

-1/6*a^4*p*x/b^4+1/9*a^3*p*x^(3/2)/b^3-1/12*a^2*p*x^2/b^2+1/15*a*p*x^(5/2)/b-1/18*p*x^3-1/3*a^6*p*ln(a+b*x^(1/
2))/b^6+1/3*x^3*ln(c*(a+b*x^(1/2))^p)+1/3*a^5*p*x^(1/2)/b^5

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2504, 2442, 45} \[ \int x^2 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=-\frac {a^6 p \log \left (a+b \sqrt {x}\right )}{3 b^6}+\frac {a^5 p \sqrt {x}}{3 b^5}-\frac {a^4 p x}{6 b^4}+\frac {a^3 p x^{3/2}}{9 b^3}-\frac {a^2 p x^2}{12 b^2}+\frac {1}{3} x^3 \log \left (c \left (a+b \sqrt {x}\right )^p\right )+\frac {a p x^{5/2}}{15 b}-\frac {p x^3}{18} \]

[In]

Int[x^2*Log[c*(a + b*Sqrt[x])^p],x]

[Out]

(a^5*p*Sqrt[x])/(3*b^5) - (a^4*p*x)/(6*b^4) + (a^3*p*x^(3/2))/(9*b^3) - (a^2*p*x^2)/(12*b^2) + (a*p*x^(5/2))/(
15*b) - (p*x^3)/18 - (a^6*p*Log[a + b*Sqrt[x]])/(3*b^6) + (x^3*Log[c*(a + b*Sqrt[x])^p])/3

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int x^5 \log \left (c (a+b x)^p\right ) \, dx,x,\sqrt {x}\right ) \\ & = \frac {1}{3} x^3 \log \left (c \left (a+b \sqrt {x}\right )^p\right )-\frac {1}{3} (b p) \text {Subst}\left (\int \frac {x^6}{a+b x} \, dx,x,\sqrt {x}\right ) \\ & = \frac {1}{3} x^3 \log \left (c \left (a+b \sqrt {x}\right )^p\right )-\frac {1}{3} (b p) \text {Subst}\left (\int \left (-\frac {a^5}{b^6}+\frac {a^4 x}{b^5}-\frac {a^3 x^2}{b^4}+\frac {a^2 x^3}{b^3}-\frac {a x^4}{b^2}+\frac {x^5}{b}+\frac {a^6}{b^6 (a+b x)}\right ) \, dx,x,\sqrt {x}\right ) \\ & = \frac {a^5 p \sqrt {x}}{3 b^5}-\frac {a^4 p x}{6 b^4}+\frac {a^3 p x^{3/2}}{9 b^3}-\frac {a^2 p x^2}{12 b^2}+\frac {a p x^{5/2}}{15 b}-\frac {p x^3}{18}-\frac {a^6 p \log \left (a+b \sqrt {x}\right )}{3 b^6}+\frac {1}{3} x^3 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.91 \[ \int x^2 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=\frac {b p \sqrt {x} \left (60 a^5-30 a^4 b \sqrt {x}+20 a^3 b^2 x-15 a^2 b^3 x^{3/2}+12 a b^4 x^2-10 b^5 x^{5/2}\right )-60 a^6 p \log \left (a+b \sqrt {x}\right )+60 b^6 x^3 \log \left (c \left (a+b \sqrt {x}\right )^p\right )}{180 b^6} \]

[In]

Integrate[x^2*Log[c*(a + b*Sqrt[x])^p],x]

[Out]

(b*p*Sqrt[x]*(60*a^5 - 30*a^4*b*Sqrt[x] + 20*a^3*b^2*x - 15*a^2*b^3*x^(3/2) + 12*a*b^4*x^2 - 10*b^5*x^(5/2)) -
 60*a^6*p*Log[a + b*Sqrt[x]] + 60*b^6*x^3*Log[c*(a + b*Sqrt[x])^p])/(180*b^6)

Maple [A] (verified)

Time = 0.40 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.80

method result size
parts \(\frac {x^{3} \ln \left (c \left (a +b \sqrt {x}\right )^{p}\right )}{3}-\frac {p b \left (-\frac {2 \left (-\frac {x^{3} b^{5}}{6}+\frac {a \,x^{\frac {5}{2}} b^{4}}{5}-\frac {a^{2} b^{3} x^{2}}{4}+\frac {a^{3} x^{\frac {3}{2}} b^{2}}{3}-\frac {b \,a^{4} x}{2}+a^{5} \sqrt {x}\right )}{b^{6}}+\frac {2 a^{6} \ln \left (a +b \sqrt {x}\right )}{b^{7}}\right )}{6}\) \(99\)

[In]

int(x^2*ln(c*(a+b*x^(1/2))^p),x,method=_RETURNVERBOSE)

[Out]

1/3*x^3*ln(c*(a+b*x^(1/2))^p)-1/6*p*b*(-2/b^6*(-1/6*x^3*b^5+1/5*a*x^(5/2)*b^4-1/4*a^2*b^3*x^2+1/3*a^3*x^(3/2)*
b^2-1/2*b*a^4*x+a^5*x^(1/2))+2*a^6/b^7*ln(a+b*x^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.85 \[ \int x^2 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=-\frac {10 \, b^{6} p x^{3} - 60 \, b^{6} x^{3} \log \left (c\right ) + 15 \, a^{2} b^{4} p x^{2} + 30 \, a^{4} b^{2} p x - 60 \, {\left (b^{6} p x^{3} - a^{6} p\right )} \log \left (b \sqrt {x} + a\right ) - 4 \, {\left (3 \, a b^{5} p x^{2} + 5 \, a^{3} b^{3} p x + 15 \, a^{5} b p\right )} \sqrt {x}}{180 \, b^{6}} \]

[In]

integrate(x^2*log(c*(a+b*x^(1/2))^p),x, algorithm="fricas")

[Out]

-1/180*(10*b^6*p*x^3 - 60*b^6*x^3*log(c) + 15*a^2*b^4*p*x^2 + 30*a^4*b^2*p*x - 60*(b^6*p*x^3 - a^6*p)*log(b*sq
rt(x) + a) - 4*(3*a*b^5*p*x^2 + 5*a^3*b^3*p*x + 15*a^5*b*p)*sqrt(x))/b^6

Sympy [A] (verification not implemented)

Time = 3.26 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.97 \[ \int x^2 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=- \frac {b p \left (\frac {2 a^{6} \left (\begin {cases} \frac {\sqrt {x}}{a} & \text {for}\: b = 0 \\\frac {\log {\left (a + b \sqrt {x} \right )}}{b} & \text {otherwise} \end {cases}\right )}{b^{6}} - \frac {2 a^{5} \sqrt {x}}{b^{6}} + \frac {a^{4} x}{b^{5}} - \frac {2 a^{3} x^{\frac {3}{2}}}{3 b^{4}} + \frac {a^{2} x^{2}}{2 b^{3}} - \frac {2 a x^{\frac {5}{2}}}{5 b^{2}} + \frac {x^{3}}{3 b}\right )}{6} + \frac {x^{3} \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{3} \]

[In]

integrate(x**2*ln(c*(a+b*x**(1/2))**p),x)

[Out]

-b*p*(2*a**6*Piecewise((sqrt(x)/a, Eq(b, 0)), (log(a + b*sqrt(x))/b, True))/b**6 - 2*a**5*sqrt(x)/b**6 + a**4*
x/b**5 - 2*a**3*x**(3/2)/(3*b**4) + a**2*x**2/(2*b**3) - 2*a*x**(5/2)/(5*b**2) + x**3/(3*b))/6 + x**3*log(c*(a
 + b*sqrt(x))**p)/3

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.80 \[ \int x^2 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=\frac {1}{3} \, x^{3} \log \left ({\left (b \sqrt {x} + a\right )}^{p} c\right ) - \frac {1}{180} \, b p {\left (\frac {60 \, a^{6} \log \left (b \sqrt {x} + a\right )}{b^{7}} + \frac {10 \, b^{5} x^{3} - 12 \, a b^{4} x^{\frac {5}{2}} + 15 \, a^{2} b^{3} x^{2} - 20 \, a^{3} b^{2} x^{\frac {3}{2}} + 30 \, a^{4} b x - 60 \, a^{5} \sqrt {x}}{b^{6}}\right )} \]

[In]

integrate(x^2*log(c*(a+b*x^(1/2))^p),x, algorithm="maxima")

[Out]

1/3*x^3*log((b*sqrt(x) + a)^p*c) - 1/180*b*p*(60*a^6*log(b*sqrt(x) + a)/b^7 + (10*b^5*x^3 - 12*a*b^4*x^(5/2) +
 15*a^2*b^3*x^2 - 20*a^3*b^2*x^(3/2) + 30*a^4*b*x - 60*a^5*sqrt(x))/b^6)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 255 vs. \(2 (97) = 194\).

Time = 0.28 (sec) , antiderivative size = 255, normalized size of antiderivative = 2.07 \[ \int x^2 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=\frac {60 \, b x^{3} \log \left (c\right ) + {\left (\frac {60 \, {\left (b \sqrt {x} + a\right )}^{6} \log \left (b \sqrt {x} + a\right )}{b^{5}} - \frac {360 \, {\left (b \sqrt {x} + a\right )}^{5} a \log \left (b \sqrt {x} + a\right )}{b^{5}} + \frac {900 \, {\left (b \sqrt {x} + a\right )}^{4} a^{2} \log \left (b \sqrt {x} + a\right )}{b^{5}} - \frac {1200 \, {\left (b \sqrt {x} + a\right )}^{3} a^{3} \log \left (b \sqrt {x} + a\right )}{b^{5}} + \frac {900 \, {\left (b \sqrt {x} + a\right )}^{2} a^{4} \log \left (b \sqrt {x} + a\right )}{b^{5}} - \frac {360 \, {\left (b \sqrt {x} + a\right )} a^{5} \log \left (b \sqrt {x} + a\right )}{b^{5}} - \frac {10 \, {\left (b \sqrt {x} + a\right )}^{6}}{b^{5}} + \frac {72 \, {\left (b \sqrt {x} + a\right )}^{5} a}{b^{5}} - \frac {225 \, {\left (b \sqrt {x} + a\right )}^{4} a^{2}}{b^{5}} + \frac {400 \, {\left (b \sqrt {x} + a\right )}^{3} a^{3}}{b^{5}} - \frac {450 \, {\left (b \sqrt {x} + a\right )}^{2} a^{4}}{b^{5}} + \frac {360 \, {\left (b \sqrt {x} + a\right )} a^{5}}{b^{5}}\right )} p}{180 \, b} \]

[In]

integrate(x^2*log(c*(a+b*x^(1/2))^p),x, algorithm="giac")

[Out]

1/180*(60*b*x^3*log(c) + (60*(b*sqrt(x) + a)^6*log(b*sqrt(x) + a)/b^5 - 360*(b*sqrt(x) + a)^5*a*log(b*sqrt(x)
+ a)/b^5 + 900*(b*sqrt(x) + a)^4*a^2*log(b*sqrt(x) + a)/b^5 - 1200*(b*sqrt(x) + a)^3*a^3*log(b*sqrt(x) + a)/b^
5 + 900*(b*sqrt(x) + a)^2*a^4*log(b*sqrt(x) + a)/b^5 - 360*(b*sqrt(x) + a)*a^5*log(b*sqrt(x) + a)/b^5 - 10*(b*
sqrt(x) + a)^6/b^5 + 72*(b*sqrt(x) + a)^5*a/b^5 - 225*(b*sqrt(x) + a)^4*a^2/b^5 + 400*(b*sqrt(x) + a)^3*a^3/b^
5 - 450*(b*sqrt(x) + a)^2*a^4/b^5 + 360*(b*sqrt(x) + a)*a^5/b^5)*p)/b

Mupad [B] (verification not implemented)

Time = 1.33 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.79 \[ \int x^2 \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=\frac {x^3\,\ln \left (c\,{\left (a+b\,\sqrt {x}\right )}^p\right )}{3}-\frac {p\,x^3}{18}-\frac {a^6\,p\,\ln \left (a+b\,\sqrt {x}\right )}{3\,b^6}-\frac {a^2\,p\,x^2}{12\,b^2}+\frac {a^3\,p\,x^{3/2}}{9\,b^3}+\frac {a^5\,p\,\sqrt {x}}{3\,b^5}+\frac {a\,p\,x^{5/2}}{15\,b}-\frac {a^4\,p\,x}{6\,b^4} \]

[In]

int(x^2*log(c*(a + b*x^(1/2))^p),x)

[Out]

(x^3*log(c*(a + b*x^(1/2))^p))/3 - (p*x^3)/18 - (a^6*p*log(a + b*x^(1/2)))/(3*b^6) - (a^2*p*x^2)/(12*b^2) + (a
^3*p*x^(3/2))/(9*b^3) + (a^5*p*x^(1/2))/(3*b^5) + (a*p*x^(5/2))/(15*b) - (a^4*p*x)/(6*b^4)